<template>
    <div class='fxn-body'>
        <AllUpload :fileData="fileData" v-model:fileList="fileList"></AllUpload>
        <el-button @click="handleSubmit">提交</el-button>
    </div>
</template>

<script>
    import AllUpload from '../Common/AllUpLoad.vue'
    import { defineComponent, reactive, getCurrentInstance, onMounted, toRefs, computed } from 'vue'
    import { useRouter } from 'vue-router'
    import { useStore } from 'vuex'
    export default defineComponent({
        components: {
            AllUpload
        },
        emit: ['update:fileList'],
        setup() {
            const { proxy } = getCurrentInstance();
            const router = useRouter();
            const store = useStore();

            //初始化数据
            const state = reactive({
                fileData: {
                    limit: 5,
                    size: 50,
                    accept: '.jpg,.png,.docx,.pdf,.xlsx,.pptx',
                    action: proxy.PathUrl + '/index/Upload/file'
                },
                fileList: [],
            })

            //
            const handleSubmit = () => {
                console.log(state.fileList)
            }
            
            //Dom加载
            onMounted(()=>{
                
            })
            
            return {
                ...toRefs(state),
                
                //请求方法
                handleSubmit,
                
                //组件方法
            }

        },
    })
</script>

<style scoped>
    
</style>